Apparatus and method for distributing a search key in a ternary memory array

ABSTRACT

Separate key processing units generate different search keys based off of a single master key received at a ternary memory array chip. A reference search key and selection logic are provided to reduce power dissipation in a global search key bus across the chip. The reference search key is the output of one of the key processing units and its bytes are compared with the output from each of the other key processing units. A select signal from each unit indicates which bytes match. Each matching byte at each key processing unit is blocked from changing corresponding bit line logic values across the chip, reducing the number of voltage switches occurring in the global search key bus. The select signal causes a selection module local to each superblock to select the matching byte(s) from the reference search key and non-matching byte(s) from the global search key bus to reconstitute the entire search key.

BACKGROUND

Field of Disclosure

The present disclosure relates generally to the transmission of dataacross buses in a ternary memory, and more particularly to thetransmission of multiple search keys that share many bytes in common ina manner to reduce power consumption in the transmission across theternary memory.

Related Art

Communication devices, such as routers and servers, are commonly used inboth corporate and personal settings to handle data and networkthroughput. These communication devices provide users withcross-communication abilities between devices, as well as the ability tocommunicate over larger networks like the interne.

In order to properly process incoming data packets, a communicationdevice must accurately identify the actions to be performed on eachpacket. The actions to be performed are stored as rules associated withan Access Control List (ACL). The communication device selects a rale tobe performed on a received packet based on one or more packetcharacteristics, such as the packet's source port and/or destinationport. Each rule may be applicable to several ports and thus requireseveral data entries in a Ternary Content Addressable Memory (TCAM).

In order to select a rule to be performed on a received packet,information from the received packet, such as the destination address ofthe received packet, is input as a master search key to key processingunits (KPU). The KPUs each re-arrange or replace particular bytes of themaster search key according to application-specific profilespre-programmed into an associated buffer. Each KPU outputs a search keythat may have one or more bytes changed or replaced according to aparticular profile, and all of the search keys are routed across anentire chip, such as a knowledge-based processor, to a TCAM array,typically arranged in superblocks. The particular key to be used at eachsuperblock is selected locally at the superblock.

As new packets are received each cycle, this results in the search keydata output from each KPU switching (such as from logic high to logiclow, or vice versa) across the bus each cycle. Often, however, many ofthe bytes in the search keys from each of the KPUs remain the same asthe master search key. The resulting switching of the data across thebus is a significant source of power consumption and loss. This powerconsumption also increases as the frequency of operation increases.

BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES

The present disclosure is described with reference to the accompanyingdrawings. In the drawings, like reference numbers generally indicateidentical, functionally similar, and/or structurally similar elements.Additionally, the left most digit(s) of a reference number identifiesthe drawing in which an element first appears.

FIG. 1 illustrates a block diagram of an exemplary communicationenvironment;

FIG. 2 illustrates a block diagram of an exemplary communication devicethat may be implemented within the communication environment;

FIG. 3 illustrates a block diagram of an exemplary device according toan embodiment of the present disclosure;

FIG. 4 illustrates a block diagram of an exemplary device according toan embodiment of the present disclosure.

FIG. 5 illustrates a flow chart of exemplary operational steps forutilizing a reference search key, according to an exemplary embodimentof the present disclosure; and

FIG. 6 illustrates a block diagram of an exemplary computer system thatcan be used to implement aspects of the present disclosure.

The disclosure will now be described with reference to the accompanyingdrawings.

DETAILED DESCRIPTION

The following Detailed Description refers to accompanying drawings toillustrate exemplary embodiments consistent with the disclosure.References in the Detailed Description to “one exemplary embodiment,”“an exemplary embodiment,” “an example exemplary embodiment,” etc.,indicate that the exemplary embodiment described may include aparticular feature, structure, or characteristic, but every exemplaryembodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same exemplary embodiment. Further, when a particularfeature, structure, or characteristic is described in connection with anexemplary embodiment, it is within the knowledge of those skilled in therelevant art(s) to effect such feature, structure, or characteristic inconnection with other exemplary embodiments whether or not explicitlydescribed.

The exemplary embodiments described herein are provided for illustrativepurposes and are not limiting. Other exemplary embodiments are possible,and modifications may be made to the exemplary embodiments within thespirit and scope of the disclosure. Therefore, the Detailed Descriptionis not meant to limit the disclosure. Rather, the scope of thedisclosure is defined only in accordance with the following claims andtheir equivalents.

Embodiments of the disclosure may be implemented in hardware, firmware,software, or any combination thereof. Embodiments of the disclosure mayalso be implemented as instructions stored on a machine-readable medium,which may be read and executed by one or more processors. Amachine-readable medium may include any mechanism for storing ortransmitting information in a form readable by a machine (e.g., acomputing device). For example, a machine-readable medium may includeread only memory (ROM); random access memory (RAM); magnetic diskstorage media; optical storage media; flash memory devices; electrical,optical, acoustical or other forms of propagated signals (e.g., carrierwaves, infrared signals, digital signals, etc.), and others. Further,firmware, software, routines, and instructions may be described hereinas performing certain actions. However, it should be appreciated thatsuch descriptions are merely for convenience and that such actions infact result from computing devices, processors, controllers, or otherdevices executing the firmware, software, routines, instructions, etc.

For purposes of this discussion, the term “module” shall be understoodto include at least one of software, firmware, and hardware (such as oneor more circuits, microchips, or devices, or any combination thereof),and any combination thereof. In addition, it will be understood thateach module may include one, or more than one, component within anactual device, and each component that forms a part of the describedmodule may function either cooperatively or independently of any othercomponent forming a part of the module. Conversely, multiple modulesdescribed herein may represent a single component within an actualdevice. Further, components within a module may be in a single device ordistributed among multiple devices in a wired or wireless manner.

The following Detailed Description of the exemplary embodiments will sofully reveal the general nature of the disclosure that others can, byapplying knowledge of those skilled in the relevant art(s), readilymodify and/or adapt for various applications such exemplary embodiments,without undue experimentation, without departing from the spirit andscope of the present disclosure. Therefore, such adaptations andmodifications are intended to be within the meaning and plurality ofequivalents of the exemplary embodiments based upon the teaching andguidance presented herein. It is to be understood that the phraseologyor terminology herein is for the purpose of description and not oflimitation, such that the terminology or phraseology of the presentspecification is to be interpreted by those skilled in relevant art(s)in light of the teachings herein.

Although the following description is to be described in terms of packetcommunication (specifically within a router), those skilled in therelevant art(s) will recognize that this description may also beapplicable to other communications that use other communicationprotocols and/or which are performed within a server or communicationend user, such as a cellular telephone, laptop computer, PDA, etc.

Exemplary Wireless Communications Environment

FIG. 1 illustrates a block diagram of an exemplary communicationenvironment 100. The communication environment 100 providescommunication of information, such as one or more commands and/or data,between communication devices. The communication devices may each beimplemented as a standalone or a discrete device, such as a mobiletelephone, or may be incorporated within or coupled to anotherelectrical device or host device, such as a portable computing device, acamera, or a Global Positioning System (GPS) unit or another computingdevice such as a personal digital assistant, a video gaming device, alaptop, a desktop computer, or a tablet, a computer peripheral such as aprinter or a portable audio and/or video player to provide some examplesand/or any other suitable electronic device that will be apparent tothose skilled in the relevant art(s) without departing from the spiritand scope of the present disclosure.

The exemplary communication environment 100 includes a communicationdevice 102. The communication device 102 includes a TCAM module 104according to the present disclosure, and optionally includes a wirelessantenna 106 for wireless communication with other wireless communicationdevices. For purposes of this discussion, the communication device 102functions as a router that processes and forwards data packets receivedfrom one or more communication devices in the communication environment100 to other communication devices in the communication environment 100.

Such devices may include devices 108 a and 108 b which are hard-wireconnected to the communication device and a wireless communicationdevice 110 that wirelessly communicates with the communication device102. The communication device 102, the devices 108 a and 108 b, and thewireless device 110 may all be located within a home network, femtocellor other small local area network. The communication device 102 may alsobe capable of communicating with out-of-network devices (i.e., device112) via a larger network 130 (e.g., Internet).

The TCAM module 104 of the communication device 102 stores ACLs andprocesses received packets from the various devices. The TCAM moduleroutes search keys that are derived from the received packets over buslines of a global bus, and consumes less power on the bus lines whenimplemented in accordance with the present disclosure.

Detailed functionality of the communication device, and of the TCAMmodule 104, is discussed below with respect to the relevant figures.

Exemplary Router

FIG. 2 illustrates a block diagram of an exemplary communication device200 that may be implemented within the communication environment 100.The communication device 200 includes a TCAM module 204 and a ruleexecution module 206, and may represent an exemplary embodiment of thecommunication device 102.

In the communication device 200, the TCAM module 204 stores ACLs. Thecommunication device 200 receives data packets from external devices viaits communication interface 202 that may include a plurality of sourceand/or destination ports. These packets are forwarded to the TCAM module204 for rule determination.

Each packet received includes source and/or destination portinformation, which the TCAM module 204 encodes. Based on the encodedport information, the TCAM module 204 identifies applicable rules, andthen selects a rule for application based on rale priority information.The TCAM module 204 forwards the data packet to the rule executionmodule 206 along with the selected rule, which executes the selectedrule on the received data packet.

The rule execution module 206 forwards the processed data packet to acontroller module 208 for performing any necessary additional processesbefore being forwarded back to the communication interface 202. Thecommunication interface 202 then transmits a response packet to theoriginating device and/or forwards data information to another devicewithin the communication environment 100.

It should be noted that FIG. 2, as well as the rest of the figures ofthe present application, represent block diagrams of various aspects ofthe present disclosure. Those skilled in the relevant art(s) willrecognize that not all interconnections to and from all of thefunctional modules or devices are shown for sake of simplicity, but willbe easily recognizable.

Exemplary Chipset Configuration

FIG. 3 illustrates a high level block diagram of an exemplary device 300according to an embodiment of the present disclosure. Device 300 mayrepresent an exemplary embodiment of the TCAM module 204. Device 300 mayadditionally or alternatively be, among other things, a knowledge-basedprocessor or other type of circuit capable of storing data that is usedfor comparison to determine matches, such as circuits that include TCAMarrays. The overall functionality of device 300 will be discussed withrespect to FIG. 3, and a detailed discussion will follow with respect toFIG. 4.

Device 300 receives a master search key 348 from the communicationinterface 202. The master search key 348 may be the destination addressof a received packet, such as one received at the communication device200. The master search key 348 could also be any other kind of data thatis to be compared against data stored in a TCAM array. In one exemplaryembodiment, the master search key 348 may be 320 bits wide;alternatively, the width of the master search key 348 may be greater orsmaller than 320 bits. In another exemplary embodiment, the mastersearch key may be 640 bits wide, or wider depending on the needs andlimitations of the particular application. The following discussion willbe described in terms of a 320-bit wide search key, though other widthsare envisioned.

The master search key 348 is input into the KPU module 306. The KPUmodule 306 may be designed to generate one or multiple search keys basedon the master search key 348. In embodiments where the KPU module 306generates multiple search keys, each search key is generated based onthe same master search key 348. Buffer 304 outputs a select signal 364to the KPU module 306. Buffer 304 may additionally or alternatively he afirst-in, first-out (FIFO) memory or a ROM. The buffer 304 ispre-programmed with different profiles. When new data arrives, such as anew incoming packet, the packet contains information that the bufferuses to determine which profile should he applied to the KPU module 306.These profiles detail which, if any, bytes in the master search key 348should be replaced with data from the respective profile in the buffer304 or swapped around within the master search key 348 by the KPU module306 for each search key,

Once the KPU module 306 has completed processing on the master searchkey 348, it outputs a modified search key 370 of the same bit width asthe master search key. The KPU module 306 also outputs a referencesearch key 352. The reference search key 352 may also he the same widthas the master search key 348. The modified search key 370 output fromthe KPU module is input into comparator module 308, and represents theone or multiple modified search keys generated by the KPU module 306.

Comparator module 308 receives the modified search key 370 as well asthe reference search key 352 from the KPU 306. The comparator module 308compares the bytes of the modified search key 370 from the KPU module306 with the bytes of the reference search key 352. The comparison maybe a byte-by-byte comparison of the modified search key 370, e.g. eachof 40 bytes based on a 320-bit master search key 348. in alternativeembodiments, the comparison may have different levels of granularity,such as every two bytes, every ten, or any other number of bytestogether as will be recognized by persons skilled in the relevantart(s). The selection of the level of granularity may be pre-programmedin the device 300, or alternatively may be dynamically changed duringoperation of the device 300. Where the KPU module 306 generates multiplemodified search keys 370, the comparator module 308 is designed toreceive each modified search key 370 and perform the comparison of eachagainst the reference search key 352.

The comparator module 308 outputs the results of the comparison as theselect signal 360, as well as a reduced search key 354, which is amodified form of the modified search key 370. The select signal 360indicates which bytes match between the reference search key 352 and themodified search key 370 output from the KPU module 306, depending on thelevel of granularity of the comparison.

The comparator module 308 only changes (from clock cycle to the next)the logic level of those bits in the reduced search key 354 thatcorrespond to non-matching bytes found in the comparison between themodified search key 370 and the reference search key 352. A global busdistributes the reduced search key 354 to various superblock(s) acrossthe TCAM device. Therefore, power consumption is reduced for keytransfer over the global bus because the matching byte(s) in the reducedsearch key 354 do not change logic state from one clock cycle the next,eliminating the charging and discharging of the various capacitors andtransistors that make up the global bus.

Where the KPU module 306 generates multiple modified search keys 370,the comparator module 308 outputs a corresponding number of reducedsearch keys 354, each with only those bits changed that correspond tonon-matching bytes found in the comparison between the correspondingmodified search keys 370 and the reference search key 352. Although thereduced search key 354 is described as being “reduced,” it is still thesame bit width as the master search key 348 to enable it to reflect anydifferences in any bytes between the corresponding modified search key370 and the reference search key 352. The search key 354 is “reduced” inthe sense that only the logic levels of those bits in the reduced searchkey 354 are changed that correspond to non-matching bytes found in thecomparison between modified search key 370 and reference search key 352.

The reduced search key 354 is routed across device 300 via, for example,a global bus line (such as shown by element 314 in FIG. 3), to a bytemultiplexer module 312, which may be one or more byte multiplexers. Theglobal bus line may include, for example, the reference search key 352,the reduced search key 354, and the select signal 360. The bytemultiplexer module 312 may receive the reference search key 352 and thereduced search key 354 in situations where the KPU module 306 isdesigned to generate only one modified search key 370. Where the KPUmodule 306 is designed to generate multiple modified search keys 370,the byte multiplexer module 312 is designed to receive the referencesearch key 352 and multiple reduced search keys 354 that correspond innumber and content to each of the modified search keys 370. In eitherembodiment, the byte multiplexer module 312 also receives the selectsignal 360. The byte multiplexer module 312 outputs combined search key366. The byte multiplexer module 312 creates the combined search key 366based on the select signal 360 by selecting those bytes from thereference search key 352 that were found to match bytes from themodified search key 370 output from the KPU module 306, and selectingthose bytes from the reduced search key 354 that were found to not matchany bytes in the reference search key 352.

The combined search key 366, which may represent a bus of combinedsearch keys 366 corresponding in number to as many modified search keys370 as were output by the KPU module 306, is input into selector module310, which may be, for example, another multiplexer with inputscorresponding to the number of modified search keys 370 generated in theKPU module 306 in addition to the reference search key 352. Based on alocal select signal 350, the selector module 310 selects which searchkey, from among the combined search key(s) 366 and the reference searchkey 352, will enter the TCAM superblock module 302 as the search key368. The TCAM superblock module 302 may represent one or more TCAMarrays.

In the above manner, the data that remains the same between bytes of thevarious modified search keys does not have to be switched between logichigh and logic low, because typically only the reference search key 352will have to reflect any byte changes common to the modified search key370 (or all of them, where there are multiple modified search keys 370).Significant power savings are achieved because fewer data lines areswitched between logic low and logic high on the global bus line 314 (orvice versa).

FIG. 4 illustrates a more detailed block diagram of an exemplary device400 according to an embodiment of the present disclosure. The device 400includes TCAM superblock modules 402.1 through 402.n, correspondingselectors 410.1 through 410.n, key selectors 412.1.1 through 412.n.q,comparators 408.1 through 408.q, KPUs 406.1 through 406.m, and buffer404. Device 400 may represent an exemplary or alternative embodiment ofthe device 300 of FIG. 3.

Device 400 receives a master search key 448 from the communicationinterface 202 substantially similar as master search key 348 discussedabove. The master search key 448 is input into each KPU 406.1, 406.2through 406.m. In one embodiment, there may be four KPUs in a givenapplication, or fewer or more depending on the particular device. EachKPU 406.1 through 406.m receives the same master search key 448. FIG. 4illustrates the KPUs 406.1 through 406.m as individual modules. Buffer404 outputs different select signals 464.1 through 464.m to each KPU406.1 through 406.m. Buffer 404 may additionally or alternatively be afirst-in, first-out (FIFO) memory or a ROM. The buffer 404 ispre-programmed with different profiles. When new data arrives, such as anew incoming packet, it contains information that the buffer uses todetermine which profile should be applied to each KPU 406.1 through406.m. These profiles detail which, if any, bytes in the master searchkey 448 should be replaced with data from the respective profile orswapped around within the search key within the given KPU.

Once each KPU 406.1 through 406.m has completed processing on the mastersearch key 448, it outputs a modified search key of the same width asthe master search key. One of the KPUs 406.1 through 406.m outputs areference search key 452. FIG. 4 illustrates the first KPU 406.1 asoutputting the reference search key 452. However, the present disclosurecontemplates that the modified search key output from any of the KPUs406.1 through 406.m may be used as the reference search key 452. Themodified search key output from the remaining KPUs 406.2 through 406.mare input into corresponding comparators 408.1 through 408.q, where qrepresents m−1 comparators, or one comparator less than the number ofKPUs in any device 400 in accordance with the present disclosure.

Comparator 408.1 receives the modified search key from KPU 406.2 as wellas the reference search key 452 that is output from KPU 406.1. Thecomparator 408.1 compares the bytes of the modified search key from KPU406.2 with the bytes of the reference search key 452. The comparison maybe between every single byte of each search key, e.g. each of 40 bytesbased on a 320-bit master search key 448. In alternative embodiments,the comparison may be between different levels of granularity, such asevery two bytes, every ten, or any other number of bytes together aswill be recognized by persons skilled in the relevant art(s). Theselection of the level of granularity may be pre-programmed in thedevice 400, or alternatively may be dynamically changed during operationof the device 400. Herein, the term “modified search key” may bereferred to simply as “search key”, for short notation to distinguishfrom the reference search key,

The results of the comparison are output by the comparator 408.1 as theselect signal 460, as well as a reduced search key 454. The selectsignal 460 identifies those bytes that are the same between thereference search key 452 and the modified search key output from the KPU406.2. A byte in the modified search key from KPU 406.2 that is found tomatch a byte in the reference search key 452 indicates either that thoseparticular bytes were changed the same way based on profiles receivedfrom the buffer 404, or that those particular bytes were not changedfrom their prior content of the corresponding byte in the master searchkey 448, wherein the prior content refers to the previous state ofcorresponding bits during the prior clock cycle. The bytes in eachmodified search key may be arranged in either the same order or adifferent order than the corresponding bytes in the master search key448.

The comparator 408.1 only changes those bits in the reduced search key454 that correspond to non-matching bytes found from the comparisonbetween the modified search key from the KPU 406.2 and the referencesearch key 452, such as from logic high to logic low or vice-versadepending on the previous state of the given bits. By way of example, ina situation where all of the bytes match between the modified search keyand the reference search key 452, none of the bits would change in thereduced search key 454, even where the modified search key from the KPU406.2 in the current clock cycle is different than what was output asthe reduced search key 454 from the comparator 408.1 in the prior clockcycle. Matching bytes are basically treated as “don't care” values inthe reduced search key 454 for the purposes of the selector circuits, asdiscussed in detail below.

The other comparators 408.2 (not shown) through 408.q also receive thereference search key 452 and perform the same type of operations usingtheir respective modified search key received from their correspondingKPU 406.3 (not shown) through 406.m, outputting corresponding selectsignals and reduced search keys (such as exemplary select signal 458 andreduced search key 456 corresponding to comparator 408.q).

The reduced search key 454 is routed across device 400 via, for example,a global bus line, to one or more selector circuits, such as bytemultiplexers 412.1.1 through 412.n.q. The global bus line may include,for example, the reference search key 452, the reduced search keys 454and 456, the other reduced search keys as output from each comparatornot expressly shown in FIG. 4, and the corresponding select signals 458and 460. In an example, byte multiplexer 412.1.1 receives as input thereference search key 452, the reduced search key 454, and the selectsignal 460. The byte multiplexer 412.1.1 outputs combined search key466.1.1. The byte multiplexer 412.1.1 creates the combined search key466.1.1 based on the select signal 460 by selecting those bytes from thereference search key 452 that were found to match bytes from themodified search key output from the KPU 406.2, and selecting those bytesfrom the modified search key 454 that were found to not match any bytesin the reference search key 452.

The other byte multiplexers 412.1.2 through 412.n.q operate in the samemanner as the byte multiplexer 412.1.1 with their respective signals.For example, byte multiplexer 412.1.q receives as its input thereference search key 452, reduced search key 456, and the select signal458, corresponding to the output from the qth comparator 408.q. Ingeneral, there are q byte multiplexers 412.1.q, corresponding to the qcomparators, assigned to each superblock module 402.1 through 402.n,each of which is configured to perform the same type of operation asdiscussed above with respect to the byte multiplexer 412.1.1 withcorresponding reduced search keys and the reference search key 452.

Focusing again on the byte multiplexer 412.1.1 for the sake ofdiscussion, the combined search key 466.1.1 is input into selector410.1, which may be, for example, another multiplexer with m inputscorresponding to the number of KPUs in the device 400, here KPUs 406.1through 406.m. The selector 410.1 also receives combined search key466.1.q and the reference search key 452. Based on a local select signal450.1, the selector 410.1 selects which search key will enter thesuperblock module 402.1 as the search key 468.1. There are n selectorscorresponding to the n superblock modules of device 400, each operatingin the same manner as discussed above with their respective signals.

In FIG. 4, dashed line boundary 414 represents a register transfer layer(RTL) boundary. For example, above the boundary 414, such as thesuperblock modules 402.1 through 402.n and the different selectors, thecircuitry is typically all custom-designed logic that is highly tailoredto each particular chipset or application. Below the boundary 414, thecomponents are typically components that find application in a pluralityof other settings, such as the KPUs 406.1 through 406.m, the comparators408.1 through 408.q, and the buffer 404. However, in alternativeembodiments the components both above and below the RTL boundary 414 maybe customized to a particular application.

FIG. 4 illustrates the KPUs 406.1 through 406.m, comparators 408.1through 408.q, byte multiplexers 412.1.1 through 412.1.q, and bytemultiplexers 412.n.1 through 412.n.q as individual modules. Thesedifferent modules may be integrated together into master KPU,comparator, and byte multiplexer modules as generally shown in FIG. 3.These master KPU, comparator, and byte multiplexer modules may becapable of receiving the same inputs and outputting the same pluralityof signals corresponding to search keys, modified search keys, combinedsearch keys, and select signals, but designed and integrated into singleintegrated circuits or areas on a die. Additionally or alternatively,the master KPU and comparator modules may further be designed as asingle integrated circuit or area on a die.

Exemplary Method

FIG. 5 illustrates a flow chart of exemplary operational steps forutilizing a reference search key, according to an exemplary embodimentof the present disclosure. The following steps will be discussed, as anexample, with respect to device 400.

Method 500 begins with step 502. At step 502, data is received at device400, such as an incoming data packet if device 400 is part of a router,as discussed above with respect to FIG. 2. The received data packetfunctions as a master search key. The master search key is then inputinto KPUs 406.1 through 406.m for further processing.

At step 504, each KPU 406.1 through 406.m may re-arrange or replace oneor more bytes of the master search key. This is based on a correspondingselect signal from a buffer, such as buffer 404, which storespre-programmed profiles. When the data packet is received at the device400, the buffer 404 determines which profiles will be sent via selectsignals 464.1 through 464.m to each of KPUs 406.1 through 406.m based onthe information contained within the data packet.

At step 506, a comparator corresponding to m−1 KPUs 406.1 through 406.mreceives the modified search key and compares the modified search keyfrom the respective KPU with a reference search key from one of the KPUsthat has no corresponding comparator. The comparison is between, forexample, each byte of each of the modified search key and the referencesearch key. The comparison could alternatively be between every twobytes, every ten, or other number of bytes in combination. Thiscomparison is performed in each corresponding comparator between acorresponding modified search key and the reference search key.

At step 508, if the comparison of a given byte of the modified searchkey indicates that there is not a match to any byte of the referencesearch key, the non-matching byte (or block of bytes, depending on thegranularity of the comparison) is output at step 510 as the reducedsearch key 454 (or 456) on a global bus line that is routed to themultiplexers local to each superblock module.

If the comparison of a given byte of the modified search key indicatesthat there is a match to any byte of the reference search key, thecomparator blocks the matching byte of the modified search key at step512, such that the data in the matching byte are not placed on the bus.In this way, the bit lines of the bus corresponding to the matchingbyte(s) are not switched from logic low to high (or logic high to low),thus decreasing power consumption. Stated another way, only non-matchingbyte(s) between the reference and modified search keys cause a logicchange on the global bus from one clock cycle to the next.

For each of steps 510 and 512 above, the comparator also outputs aselect signal that indicates which bytes of the modified search key onthe bus should be compiled at a multiplexer from the reference searchkey and which should be compiled from the modified search key on thebus. In other words, the select signal identifies the matching bytesthat can be used to reconstruct the combined search key at thesuperblock module.

At step 514, selectors, such as byte multiplexers 412.1.1 through412.n.q (the number of byte multiplexers corresponding to the number ofcomparators and duplicated for each superblock module), create acombined search key based on the inputs from the reference search keyand the modified search key on the bus. The combination is determinedbased on the select signal from each comparator. For each byte that theselect signal indicates there was no match, the byte multiplexer takesthe byte from the modified search key from the bus. For each byte thatthe select signal indicates there was a match, the byte multiplexertakes the matching byte from the reference search key.

At step 516, now that a combined search key has been re-compiledcorresponding to each comparator, another selector receives as manycombined search keys as there are KPUs in the device 400, includingreference search key 452, and selects which search key will be inputinto the corresponding superblock module based on a local select signal.This occurs at a selector located with each superblock module of thedevice 400.

At step 518, each superblock module performs a search using thecorresponding selected search key from step 516. The search is performedin order to find any matches within the TCAM array, which in one exampleis used to determine at which output ports the received data packetshould be placed.

Exemplary Computer System Implementation

It will be apparent to persons skilled in the relevant art(s) thatvarious elements and features of the present disclosure, as describedherein, can be implemented in hardware using analog and/or digitalcircuits, in software, through the execution of instructions by one ormore general purpose or special-purpose processors, or as a combinationof hardware and software.

The following description of a general purpose computer system isprovided for the sake of completeness. Embodiments of the presentdisclosure can be implemented in hardware, or as a combination ofsoftware and hardware. Consequently, embodiments of the disclosure maybe implemented in the environment of a computer system or otherprocessing system, An example of such a computer system 600 is shown inFIG. 6. One or more of the modules depicted in the previous figures canbe implemented by one or more distinct computer systems 600.

Computer system 600 includes one or more processors, such as processor604. Processor 604 can be a special purpose or a general purpose digitalsignal processor. Processor 604 is connected to a communicationinfrastructure 602 (for example, a bus or network). Various softwareimplementations are described in terms of this exemplary computersystem. After reading this description, it will become apparent to aperson skilled in the relevant art(s) how to implement the disclosureusing other computer systems and/or computer architectures.

Computer system 600 also includes a main memory 606, preferably

RAM, and may also include a secondary memory 608. Secondary memory 608may include, for example, a hard disk drive 610 and/or a removablestorage drive 612, representing a floppy disk drive, a magnetic tapedrive, an optical disk drive, a flash memory drive, or the like.Removable storage drive 612 reads from and/or writes to a removablestorage unit 616 in a well-known manner. Removable storage unit 616represents a floppy disk, magnetic tape, optical disk, flash memory, orthe like, which is read by and written to by removable storage drive612. As will be appreciated by persons skilled in the relevant art(s),removable storage unit 616 includes a computer usable storage mediumhaving stored therein computer software and/or data.

In alternative implementations, secondary memory 608 may include othersimilar means for allowing computer programs or other instructions to beloaded into computer system 600. Such means may include, for example, aremovable storage unit 618 and an interface 614. Examples of such meansmay include a program cartridge and cartridge interface (such as thatfound in video game devices), a removable memory chip (such as an EPROM,or PROM) and associated socket, a flash memory drive and USB port, andother removable storage units 618 and interfaces 614 which allowsoftware and data to be transferred from removable storage unit 618 tocomputer system 600.

Computer system 600 may also include a communications interface 620.Communications interface 620 allows software and data to be transferredbetween computer system 600 and external devices. Examples ofcommunications interface 620 may include a modem, a network interface(such as an Ethernet card), a communications port, a PCMCIA slot andcard, etc. Software and data transferred via communications interface620 are in the form of signals which may be electronic, electromagnetic,optical, or other signals capable of being received by communicationsinterface 620. These signals are provided to communications interface620 via a communications path 622. Communications path 622 carriessignals and may be implemented using wire or cable, fiber optics, aphone line, a cellular phone link, an RF link and other communicationschannels.

As used herein, the terms “computer program medium” and “computerreadable medium” are used to generally refer to tangible storage mediasuch as removable storage units 616 and 618 or a hard disk installed inhard disk drive 610. These computer program products are means forproviding software to computer system 600.

Computer programs (also called computer control logic) are stored inmain memory 606 and/or secondary memory 608. Computer programs may alsobe received via communications interface 620. Where the disclosure isimplemented using software, the software may be stored in a computerprogram product and loaded into computer system 600 using removablestorage drive 612, interface 614, or communications interface 620.

In another embodiment, features of the disclosure are implementedprimarily in hardware using, for example, hardware components such asapplication-specific integrated circuits (ASICs) and gate arrays.Implementation of a hardware state machine so as to perform thefunctions described herein will also be apparent to persons skilled inthe relevant art(s).

CONCLUSION

It is to be appreciated that the Detailed Description section, and notthe Abstract section, is intended to be used to interpret the claims.The Abstract section may set forth one or more, but not all exemplaryembodiments, of the present disclosure, and thus, is not intended tolimit the present disclosure and the appended claims in any way.

The present disclosure has been described above with the aid offunctional building blocks illustrating the implementation of specifiedfunctions and relationships thereof. The boundaries of these functionalbuilding blocks have been arbitrarily defined herein for the convenienceof the description. Alternate boundaries may be defined so long as thespecified functions and relationships thereof are appropriatelyperformed.

It will be apparent to those skilled in the relevant art(s) that variouschanges in form and detail can be made therein without departing fromthe spirit and scope of the disclosure. Thus the present disclosureshould not be limited by any of the above-described exemplaryembodiments, but should be defined only in accordance with the followingclaims and their equivalents.

What is claimed is:
 1. A device, comprising: a global bus; and one ormore processors and/or circuits configured with: a key processing moduleconfigured to receive a data packet and to output a reference search keyand a search key based on the data packet; a comparator moduleconfigured to: compare bytes of the search key against bytes of thereference search key to determine matching bytes and non-matching bytesof the search key, generate a reduced search key based on the results ofthe comparison, the reduced search key including only the non-matchingbytes of the search key, and excluding the matching bytes of the searchkey; output the reduced search key onto the global bus by blocking thematching bytes from being placed onto the global bus; generate a byteselect signal that indicates which bytes of the search key are thematching bytes and which bytes of the search key are the non-matchingbytes; and output the byte select signal onto the global bus; and aselector module corresponding to the comparator module, the selectormodule configured to receive the reference search key, the reducedsearch key, and the byte select signal, and further configured toselect, based on the byte select signal, the non-matching bytes from thereduced search key and the matching bytes from the reference search keyto create a combined search key.
 2. The device of claim 1, furthercomprising: an array of ternary content-addressable memory (TCAM)modules; a buffer configured to store a plurality of profiles, thebuffer selecting separate profiles indicating which bytes of the datapacket to modify to create the reference search key and the search key;and a TCAM key selector module corresponding to a TCAM module from thearray of TCAM modules, the TCAM key selector module being configured toselect one of the reference search key and the combined search key forinput into the TCAM module.
 3. The device of claim 1, furthercomprising: an array of ternary content-addressable memory (TCAM)modules, wherein: the key processing module is one of a plurality of keyprocessing modules, each key processing module configured to receive thedata packet and output a corresponding search key based on the datapacket; the comparator module is one of a plurality of comparatormodules corresponding to the plurality of key processing modules; theselector module is one of a plurality of selector modules correspondingto the plurality of comparator modules; and the global bus has a bitwidth equaling a combined bit width of the reference search key and thecorresponding search key from each key processing module from theplurality of key processing modules.
 4. The device of claim 1, furthercomprising a knowledge-based processor.
 5. The device of claim 4,wherein the knowledge-based processor comprises a component of a router.6. The device of claim 1, wherein the comparator module is furtherconfigured to compare each byte of the search key against each byte ofthe reference search key.
 7. The device of claim 1, wherein thecomparator module is further configured to compare every two bytes ofthe search key against every two bytes of the reference search key.
 8. Amethod, comprising: modifying individual bytes of a data packet in firstand second key processing modules based on profile data; comparing areference search key from the first key processing module with a searchkey from the second key processing module at a comparator module todetermine matching bytes and non-matching bytes of the search key;generating a reduced search key based on the results of the comparison,the reduced search key including only the non-matching bytes of thesearch key, and excluding matching bytes of the search key; outputtingthe reduced search key onto a global bus, the outputting includingblocking the matching bytes from being placed onto the global bus;generating a select signal based on the comparison; and generating acombined search key at a selector module by combining the non-matchingbytes from the reduced search key and the matching bytes from thereference search key based on the select signal.
 9. The method of claim8, further comprising: receiving the data packet at the first and secondkey processing modules; and generating the select signal in thecomparator module, the select signal designating the matching bytes andthe non-matching bytes of the search key.
 10. The method of claim 8,wherein the modifying further comprises: replacing the individual byteswith bytes designated in the profile data, the profile data being apre-programmed profile stored in a buffer.
 11. The method of claim 8,further comprising: selecting between the combined search key and thereference search key for input into a ternary content-addressable memory(TCAM) module.
 12. The method of claim 8, wherein: the modifying furthercomprises modifying individual bytes of the data packet in a pluralityof key processing modules to generate a plurality of search keys, eachsearch key corresponding to a different key processing module from theplurality of key processing modules; the comparing further comprisescomparing the reference search key from the first key processing modulewith each search key in a plurality of comparator modules, the pluralityof comparator modules corresponding to the plurality of key processingmodules; the generating the reduced search key further comprisesgenerating a corresponding reduced search key for each search key ateach comparator module; the outputting further comprises outputting thecorresponding reduced search key of each search key at each comparatormodule; and the generating the combined search key further comprisesgenerating a corresponding combined search key for each search key at aplurality of selector modules, the plurality of selector modulescorresponding to the plurality of comparator modules.
 13. The method ofclaim 8, wherein the comparing further comprises comparing each byte ofthe search key against each byte of the reference search key.
 14. Themethod of claim 8, wherein the comparing further comprises comparingevery two bytes of the search key against every two bytes of thereference search key.
 15. A device, comprising; one or more processorsand/or circuits configured with: a plurality of key processing modules,each configured to receive a master search key derived from a receiveddata packet and to modify one or more bytes of the master search key,wherein a first key processing module from the plurality of keyprocessing modules is configured to output a reference search key and aremainder of the key processing modules are each configured to output arespective search key; a plurality of comparator modules correspondingto the remainder of the key processing modules, the plurality ofcomparator modules each having a plurality of output lines andconfigured to: compare the respective search key with the referencesearch key to determine matching bytes and non-matching bytes of therespective search key: generate a respective reduced search key based onthe results of the comparison, the respective reduced search keyincluding only the non-matching bytes of the respective search key, andexcluding the matching bytes of the respective search key, such that thematching bytes of the respective search key do not change correspondingbit logic levels on First corresponding output lines of the plurality ofoutput lines; output the respective reduced search key on secondcorresponding output lines of the plurality of output lines, theoutputting including blocking the matching bytes from being placed ontothe plurality of output lines; and a plurality of selector modulescorresponding to the plurality of comparator modules configured togenerate a plurality of composite search keys, each selector modulebeing configured to select the non-matching bytes of the respectivereduced search key and the matching bytes from the reference search keyto generate a respective composite search key.
 16. The device of claim15, further comprising: a plurality of ternary content-addressablememory (TCAM) superblocks; a plurality of key selector modulescorresponding to the plurality of TCAM superblocks, each key selectormodule configured to select one from among the reference search key andthe plurality of composite search keys for input into a correspondingTCAM superblock.
 17. The device of claim 15, wherein: the output linesof each comparator module are combined into a global bus, the global buscomprising a bit width equaling a combined bit width of the referencesearch key and each search key from the plurality of key processingmodules.
 18. The device of claim 15, wherein a bit width of eachcomposite search key from the plurality of selector modules equals a bitwidth of the master search key.
 19. The device of claim 15, wherein theplurality of selector modules are configured to select based on selectsignals generated from the corresponding plurality of comparatormodules, each select signal being encoded with data representing thematching bytes and the non-matching bytes of the respective search key.20. The device of claim 15, wherein each comparator module is configuredto compare bytes of the respective search key with the reference searchkey, the number of bytes being compared per comparison being dynamicallychangeable.